{extend name="public:member" /}
{block name="content"}
<div id="member_content">
	<div class="allWrap">
		{include file="public:member_menu" /}
		<div id="right_content">
			
			<div id="member-nav" class="clearfix">
				<ul id="top-tag" class="order-list">
					<li class="fl on">						
						<a href="{:url('Aftersales/index')}">售后记录</a>								
					</li>		
							
				</ul>
			</div>
			
			<table class="table boxorder">
				<thead>
					<tr>	
						<th>订单号</th> 
						<th>类型</th> 									
						<th>状态</th>	
						<th>申请时间</th>	
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{volist name="list" id="d" empty="$empty"}
					<tr>
						<td>
							<a class="blue" href='<?php echo url("OrderMember/show_order",array("id"=>hashids()->encode($d["order_id"]))); ?>'>{$d.order_sn}</a>
						</td>
						<td>
							{switch name="d.refund_type"}
								{case value="1"}退款{/case}
								{case value="2"}退款退货{/case}
							{/switch}
						</td>
						<td>
							{switch name="d.status"}
								{case value="1"}待处理{/case}
								{case value="2"}已同意{/case}
								{case value="3"}拒绝{/case}
							{/switch}
						</td>
						<td>
							{$d.add_time|date='Y-m-d H:i:s',###}
						</td>
						<td>
							{if condition="$d['step'] eq 1 "}
							<a href="<?php echo url('aftersales/step2',array('rid'=>hashids()->encode($d['refund_id']),'type'=>hashids()->encode($d['refund_type']),'order_id'=>hashids()->encode($d['order_id']))); ?>" class="btn">查看进度</a>
							{/if}
							{if condition="$d['step'] eq 2 "}
							<a href="<?php echo url('aftersales/step3',array('rid'=>hashids()->encode($d['refund_id']),'order_id'=>hashids()->encode($d['order_id']))); ?>" class="btn">查看进度</a>
							{/if}
							{if condition="$d['step'] eq 3 "}
							<a href="<?php echo url('aftersales/refund_result',array('rid'=>hashids()->encode($d['refund_id']),'order_id'=>hashids()->encode($d['order_id']))); ?>" class="btn">查看</a>
							{/if}
						</td>
					</tr>
					{/volist}
					<tr>
						<td colspan="20" class="page">{$list->render()}</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
{/block}